<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>角色主页</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<%@ include file="/WEB-INF/common.jsp"%>

<link href="${path }/resources/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<link href="${path }/resources/css/animate.css" rel="stylesheet">
<link href="${path }/resources/css/style.css?v=4.1.0" rel="stylesheet">

<!--dataTables css样式-->
<link rel="stylesheet" type="text/css"
	href="${path }/resources/css/jquery.dataTables.min.css">
<!--DataTables button扩展-->
<link rel="stylesheet" type="text/css"
	href="${path }/resources/css/buttons.dataTables.min.css">
<link rel="stylesheet" type="text/css"
	href="${path }/resources/css/form.css">


</head>
<body class="gray-bg" style="">
<jsp:include page="/WEB-INF/loginCheck.jsp" />
	<div>
		<h1 style="margin-left:20px">添加人员账号</h1>
	</div>
	<hr>
	<!--添加的表单  -->
	<div id="" barclass="panel-body" style="margin-top: 30px">
		<%-- action="${path }/Enterprise/addEnterPerson.htm" method="post"  --%>
		<form id="cForm" action="${path }/Proprietor/editProprietor.htm" data-parsley-validate class="form-horizontal form-label-left" >
		<div class="row">
		
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">业主名称<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content.name}" name="name" required="required" class="form-control col-md-7 col-xs-12" required="required">
					<input value = "${content.id}" name = "id" type = "hidden">
	
			</div>
				<label class="control-label col-md-2 col-sm-2 col-xs-4""
					for="last-name">地址<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content.address}" name="address" required="required" class="form-control col-md-7 col-xs-12" required="required">
					

			</div>
		</div>
		<hr>
		<div class="row">
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">业主联系人姓名<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content1.name}" name="name1" required="required" class="form-control col-md-7 col-xs-12" required="required">
					<!-- 标志业主联系人类型 -->
					<input  value="1" name="type1" required="required" class="form-control col-md-7 col-xs-12" required="required" type="hidden">
				    <input value = "${content1.id}" name = "id1" type = "hidden">
				</div>
			</div>
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="first-name">性别<span class="required">*</span>
				</label>
				<!-- <div class="col-md-3 col-sm-3 col-xs-6">
					<label class="control-label"><input value="男" name="gender1" type="radio" required="required"  style="margin-left:15px;">男</label>
					<label class="control-label"><input value="女" name="gender1" type="radio" required="required"  style="margin-left:35px;">女</label>				
				</div> -->

					<label class="control-label"><input value="男" name="gender1" type="radio" required="required"  style="margin-left:15px;">男</label>
					<label class="control-label"><input value="女" name="gender1" type="radio" required="required"  style="margin-left:35px;">女</label>				
	
			</div>
		</div>
		<div class="row" style="margin-top: 5px">
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">电话<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content1.mobilePhone}" name="phone_number1" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">QQ<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content1.qq}" name="qq1" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
		</div>
		<div class="row" style="margin-top:5px">
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">所在单位<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content1.department}" name="department1" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">身份证号<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content1.identificationCard}" name="IDCard1" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
		</div>
		<div class="row" style="margin-top:5px">
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">专业技术等级<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<select id="identity" class="selectpicker form-control" data-live-search="true" name="technical_level1" required="required">
						<option value="1">一级</option>
		                <option value="2">二级</option>
		                <option value="3">三级</option>
					</select>
				</div>
			</div>
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">公司职务<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content1.position}" name="position1" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
		</div>
		<hr>
		<div class="row" style="margin-top: 5px">
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">现场联系人姓名<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content2.name}" name="name2" required="required" class="form-control col-md-7 col-xs-12" required="required">
					<!-- 标志现场联系人类型 -->
					<input  value="2" name="type2" required="required" class="form-control col-md-7 col-xs-12" required="required" type="hidden">
				    <input value = "${content2.id}" name = "id2" type = "hidden">
				</div>
			</div>
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="first-name">性别<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<label style="font-size:20px"><input value="男" name="gender2" type="radio" required="required"  style="margin-left:15px;">男</label>
				<label style="font-size:20px"><input value="女" name="gender2" type="radio" required="required"  style="margin-left:35px;">女</label>
				</div>
			</div>
		</div>
		<div class="row" style="margin-top: 5px">
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">电话<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content2.mobilePhone}" name="phone_number2" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">QQ<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content2.qq}" name="qq2" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
		</div>
		<div class="row" style="margin-top: 5px">
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">所在单位<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content2.department}" name="department2" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">身份证号<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content2.identificationCard}" name="IDCard2" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
		</div>
		<div class="row" style="margin-top: 5px">
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">专业技术等级<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<select id="identity" class="selectpicker form-control" data-live-search="true" name="technical_level2" required="required">
						<option value="1">一级</option>
		                <option value="2">二级</option>
		                <option value="3">三级</option>
					</select>
				</div>
			</div>
			<div class="">
				<label class="control-label col-md-2 col-sm-2 col-xs-4"
					for="last-name">公司职务<span class="required">*</span>
				</label>
				<div class="col-md-3 col-sm-3 col-xs-6">
					<input  value="${content2.position}" name="position2" required="required" class="form-control col-md-7 col-xs-12" required="required">
				</div>
			</div>
		</div>

		<hr>
						
		<div class="form-group">
			<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3" >
				<button id="submit" type="submit" class="btn btn-success">提交</button>
				<a href="${path }/Proprietor/queryAllProprietor.htm" class="btn btn-primary" style="margin-left:500px;">返回</a>
			</div>
		</div>

		</form>

	</div>
	
  	<!--表格  -->
 	<div class="col-md-12 col-sm-12 col-xs-12" style="margin-top: 30px">
	

	</div>
 
 

		

	
	

	
	

	
	<!-- Peity-->
	<script src="${path }/resources/js/plugins/peity/jquery.peity.min.js"></script>
	
	<!-- Bootstrap table-->
	<script src="${path }/resources/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
	<script src="${path }/resources/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>

	<!-- 自定义js-->
	<script src="${path }/resources/js/content.js?v=1.0.0"></script>
	
	<!-- jQuery Validation plugin javascript-->
    <script src="${path }/resources/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="${path }/resources/js/plugins/validate/messages_zh.min.js"></script>
   
   	<!-- jQuery form  -->
    <script src="${path }/resources/js/jquery.form.min.js"></script>
    
    <!-- layer javascript -->
    <script src="${path }/resources/js/plugins/layer/layer.min.js"></script>
    
         <!-- 表单验证 -->
    <script src="${path }/resources/js/jquery.min.js"></script>
    <script src="${path }/resources/js/jquery.validate.min.js"></script>
    
    <script type="text/javascript">

	$("#cForm").validate({
		onsubmit:true,// 是否在提交是验证
		onfocusout:false,// 是否在获取焦点时验证
		onkeyupd :false,// 是否在敲击键盘时验证
		
		rules:{
			name:{
				required:true
			},
			address:{
				required:true
			},
 			name1:{
				required:true,
				//digits:true//必须输入整数
			},
			gender1:{
				required:true,
			},
			phone_number1:{
				required:true,
			 	digits:true,
			 	rangelength:[11,11],//输入长度
			},
			qq1:{
				required:true,
				digits:true
			},
			IDCard1:{
				required:true,
			},
			
			department1:{
				required:true
			},
			technical_level1:{
				required:true
			},
			position1:{
				required:true
			},
			name2:{
				required:true,
				//digits:true//必须输入整数
			},
			gender2:{
				required:true,
			},
			phone_number2:{
				required:true,
			 	digits:true,
			 	rangelength:[11,11],//输入长度
			},
			qq2:{
				required:true,
				digits:true
			},
			IDCard2:{
				required:true,
			},
			
			department2:{
				required:true
			},
			technical_level2:{
				required:true
			},
			position2:{
				required:true
			}, 
		},
		messages:{
			name:{
				required:"请输入业主名"
			},
			address:{
				required:"请输入地址"
			},
			name1:{
				required:"请输入业主联系人姓名",
				//digits:true//必须输入整数
			},
			gender1:{
				required:"请输入性别",
			},
			phone_number1:{
				required:"请输入电话号码",
			 	digits:"电话号码必须是数字",
			 	rangelength:[11,11],//输入长度
			},
			qq1:{
				required:"请输入QQ号",
				digits:"QQ号必须是数字"
			},
			IDCard1:{
				required:"请输入身份证号",
			},
			
			department1:{
				required:"请输入所在单位"
			},
			technical_level1:{
				required:"请选择技术等级"
			},
			position1:{
				required:"请输入公司职位"
			},
			name2:{
				required:"请输入业主联系人姓名",
				//digits:true//必须输入整数
			},
			gender2:{
				required:"请输入性别",
			},
			phone_number2:{
				required:"请输入电话号码",
			 	digits:"电话号码必须是数字",
			 	rangelength:[11,11],//输入长度
			},
			qq2:{
				required:"请输入QQ号",
				digits:"QQ号必须是数字"
			},
			IDCard2:{
				required:"请输入身份证号",
			},
			
			department2:{
				required:"请输入所在单位"
			},
			technical_level2:{
				required:"请选择技术等级"
			},
			position2:{
				required:"请输入公司职位"
			},
			
		},
		submitHandler:function(form){//通过之后回调
			alert("编辑成功！");
		form.submit();
		}
		
	});

	</script>


</body>
</html>